﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _113_结构体测试
{
    class Program
    {
        static void Main(string[] args)
        {
            Vector3 v3 = new Vector3
            {
                x = 1f,
                y = 1f,
                z = 1f
            };
            Console.WriteLine(v3.ToString());

            List<Vector3> vector3s = new List<Vector3>();
            for (int i = 0; i < 2; i++)
            {
                vector3s.Add(v3);
            }
            v3.x = 2f;
            v3.y = 2f;
            v3.z = 2f;
            Console.WriteLine(vector3s[0]); //证明结构体赋值以后，改变原来结构体，对新的List没有影响
            Console.ReadKey();
        }
    }
}
